package com.hejx.chat.common.core.model;

/**
 * Created by 追风少年
 * 网络消息对象
 * @email doubihah@foxmail.com
 * @create 2018/2/1 16:14
 **/
public class NetRequest {

    /**
     * 模块号
     */
    private short module;

    /**
     * 命令号
     */
    private short cmd;

    /**
     * 数据
     */
    private byte[] data;

    public static NetRequest valueOf(short module, short cmd, byte[] data){
        NetRequest request = new NetRequest();
        request.setModule(module);
        request.setCmd(cmd);
        request.setData(data);
        return request;
    }

    public byte[] getData() {
        return data;
    }

    public void setData(byte[] data) {
        this.data = data;
    }

    public short getModule() {
        return module;
    }

    public void setModule(short module) {
        this.module = module;
    }

    public short getCmd() {
        return cmd;
    }

    public void setCmd(short cmd) {
        this.cmd = cmd;
    }

}
